<?php
class Web_Config_DB
{
    /**
     * 数据库连接配置
     * 
     * @return array
     */
    public static function getConfig()
    {
    	//开发环境DB配置
    	$DBDevConfig = array(
    	'host'        => '127.0.0.1',
        'user'        => 'root',
        'password'    => '123456',
        'defaultDB'   => 'eshifang',
        'port'        => '3306',
    	);
    	//正式环境DB配置
    	$DBConfig = array(
    	'host'        => '127.0.0.1',
        'user'        => 'eshifang_deity',
        'password'    => 'love6825',
        'defaultDB'   => 'eshifang_eshifang',
        'port'        => '3306',
    	);
    	if($_SERVER['SERVER_ADDR'] == '75.126.84.84'){
    		return $DBConfig;
    	}
    	return $DBDevConfig;
    }
}
